package jpf.nextsearch.search.model;

import jpf.nextsearch.ds.model.types.ResourceServiceType;
import jpf.nextsearch.ds.model.types.ResourceType;

/**
 * @author <a href="mailto:jacek.pruszkowski@gmail.com">Jacek Pruszkowski</a>
 */
public class SearchRequest {

	public static final int SEARCH_TYPE_NAME_ONLY = 0;
	public static final int SEARCH_TYPE_PATH_ONLY = 1;
	public static final int SEARCH_TYPE_NAME_AND_PATH = 2;

	private String query;
	private ResourceType resourceType;
	private ResourceServiceType resourceServiceType;
	private int searchType = SEARCH_TYPE_NAME_ONLY;
	private boolean searchActiveHostsOnly;
	private int resultsStart;
	private int maxResults;

	public String getQuery() {
		return query;
	}

	public void setQuery(String query) {
		this.query = query;
	}

	public ResourceType getResourceType() {
		return resourceType;
	}

	public void setResourceType(ResourceType resourceType) {
		this.resourceType = resourceType;
	}

	public void setSearchActiveHostsOnly(boolean searchActiveHostsOnly) {
		this.searchActiveHostsOnly = searchActiveHostsOnly;
	}

	public boolean isSearchActiveHostsOnly() {
		return searchActiveHostsOnly;
	}

	public void setResultsStart(int resultsStart) {
		this.resultsStart = resultsStart;
	}

	public int getResultsStart() {
		return resultsStart;
	}

	public void setMaxResults(int maxResults) {
		this.maxResults = maxResults;
	}

	public int getMaxResults() {
		return maxResults;
	}

	public void setSearchType(int searchType) {
		this.searchType = searchType;
	}

	public int getSearchType() {
		return searchType;
	}

	public void setResourceServiceType(ResourceServiceType resourceServiceType) {
		this.resourceServiceType = resourceServiceType;
	}

	public ResourceServiceType getResourceServiceType() {
		return resourceServiceType;
	}

}
